<template>
  <div>
    <div class="search-box">
      <van-icon size="20" style="margin-left:14px" name="arrow-left" @click="$router.go(-1)" />
      <div class="search">
        <input  v-model.trim="content">
      </div>
      <van-button
       @click="enterList"
       style="margin-left:55px;border-radius:6px" size="small" color="#ff734c">搜索</van-button>
    </div>
  </div>
</template>

<script>
export default {
  data: () => {
    return {
      content: ''
    }
  },
  methods: {
    enterList () {
      this.$router.replace({
        query: {
          word: this.content
        },
        path: '/searchLists'
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.search-box{
  width: 100%;
  display: flex;
  background-color: #fff;
  text-align: center;
  height: 50px;
  line-height: 50px;
  align-items: center;
  .search{
    margin-left: 18px;
    width: 60%;
    input{
      height: 30px;
      border-radius: 30px;
      border: 1px solid #eee;
      background-color: #f3f5f7;
      padding-left: 35px;
      width: 100%;
      font-size: 16px;
    }
  }
}
</style>
